perm filename BAZ.LSP[W81,JMC]1 blob
sn#557655 filedate 1981-01-21 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 (defun findpath (x y) (fp1 (list x) y nil))
C00003 ENDMK
Cā;
(defun findpath (x y) (fp1 (list x) y nil))
(defun fp1 (u y path) (cond
((null u) 'lose)
((member (car u) path) (fp1 (cdr u) y path))
((equal (car u) y) (reverse (cons y path)))
(t ((lambda (w) (cond
((eq w 'lose) (fp1 (cdr u) y path))
(t w)))
(fp1 (successors (car u)) y (cons (car u) path))))))